package fr.greta.centre.dao;

import static org.junit.Assert.*;

import java.util.ArrayList;

import org.junit.Test;

import fr.greta.centre.metier.ActionsFormation;
import fr.greta.centre.metier.Module;

public class ModuleDAOImplTest extends DAOCentreFormationTestCase{

	
	/** WHAT' S THE F***??? Si qqn comprend ca je veux bien qu'il m'explique?
	 * 
	 * java.lang.AssertionError: Not yet implemented
	at org.junit.Assert.fail(Assert.java:93)
	at fr.greta.centre.dao.ModuleDAOImplTest.testSave(ModuleDAOImplTest.java:11)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


	 */
	/*
	@Test
	public final void testSave() {
		ModuleDAOImpl dao = new ModuleDAOImpl();
		int id = 6;
		ArrayList<ActionsFormation> lesActionsFormation = new ArrayList<ActionsFormation>();
		Module unModule = new Module(0, "Droit", "DR01", 2, lesActionsFormation);
		dao.save(unModule);
		Module leModuleRecupere = dao.findByKey(id);
		assertEquals(unModule, leModuleRecupere);
	}
*/
	@Test
	public final void testDelete() {
		ModuleDAOImpl dao = new ModuleDAOImpl();
		dao.delete(1);
		
	}
	/*
	@Test
	public final void testFindByKey() {
		assertNull(null);
	}

	@Test
	public final void testFindAll() throws SQLException{
		ModuleDAOImpl dao = new ModuleDAOImpl();
		assertNotNull(dao.findAll());
	}
*/
}
